import { createRouter, createWebHistory } from 'vue-router'
import IndexView from '../views/index/index.vue'
import Layout from '../views/layout/index.vue'
import UserView from '../views/user/index.vue'
import CategoryView from '../views/category/index.vue'
import NursingProjectView from '../views/nusring/index.vue'
import NursingLevelView from '../views/level/index.vue'
import LoginView from '../views/login/index.vue'


const routes = [{
  path: '/',
  component: Layout,
  redirect: '/index',
  children: [
    {path: '/index',name:'index',component: IndexView,},
    {path: '/user',name:'user',component: UserView},
    {path: '/category',name:'category',component: CategoryView},
    {path: '/nursing',name:'nursing',component: NursingProjectView},
    {path: '/level',name:'level',component: NursingLevelView}
  ]
},{path: '/login',name:'login',component: LoginView}]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
